﻿<%@ Page Title="" Language="C#" MasterPageFile="Admin.master" Debug="true" %>
<%@ Register src="../module/Types.ascx" tagname="Types" tagprefix="inal" %>

<script runat="server">
    public static string Item_Img;
    public int Item_Id = 0;
    Product product;
    protected void Page_Load(object sender, EventArgs e)
    {

        Item_Id = Utils.GetQueryString("id", 0);
        product = new Product(Item_Id);

    }
    public string FormatHtmlCode(string Text_Value)
    {
        ///* URL 选晰 */
        Text_Value = Utils.HtmlDecode(Text_Value);
        Text_Value = Text_Value.Replace("<br />", "");
        Text_Value = Text_Value.Replace("  ", "");
        Text_Value = Text_Value.Replace("\t", "");
        Text_Value = Text_Value.Replace("<BR>", "");
        // Text_Value = Text_Value.Replace("&amp;amp;", "&");
        return Text_Value;
    }
</script>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
<script src="../Pulgin/kindeditor-4.1/kindeditor-all.js" type="text/javascript"></script>
<link href="../Pulgin/kindeditor-4.1/themes/default/default.css" rel="stylesheet" type="text/css" />
<script src="../Pulgin/kindeditor-4.1/lang/zh_CN.js" type="text/javascript"></script>
<script type="text/javascript">
    attachAll = true;
    var Item_Time='<%= product.Create_Time%>';
    $(document).ready(function(){
        $("#Typ2_0").val(<%=product.Item_Typ %>)
    });
    var editor;
    KindEditor.ready(function(K) {
	    editor = K.create('textarea[name="content"]', {allowFileManager : true,pasteType : 1});
    });
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"><%=Lang.Show("ProductCenter")%> - <%=Lang.Show("Edit")%></asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
<table class="inputs">
    <tr>
        <td style="width:90px"><%=Lang.Show("Columns") %> :</td>
        <td><inal:Types runat="server" Type="2"  /></td>
        <td><div id="Validate-Typ2_0"></div></td>
    </tr>
    <tr>
        <td><%=Lang.Show("Title") %> :</td>
        <td><input type="text" id="Item_Name" value="<%=product.Item_Name %>"   /></td>
        <td><div id="Validate-Item_Name"></div></td>
    </tr>
    <tr>
        <td><%=Lang.Show("Item_Price")%> :</td>
        <td><input type="text" id="Item_Price" maxlength="10" value="<%=product.Item_Price %>"  /></td>
        <td><div id="Validate-Item_Price"></div></td>
    </tr>
</table>
<table>
    <tr>
        <td style="width:90px"><%=Lang.Show("Item_Introduction")%> :</td>
        <td><textarea id="Item_Introduction" name="content" style="width:980px; height:300px;" ><%=FormatHtmlCode(product.Item_Introduction)%></textarea></td>
        <td><p></p></td>
    </tr>
</table>
<table class="inputs">
    <tr>
        <td style="width:90px"><%=Lang.Show("Item_Instructions")%> :</td>
        <td><textarea rows="2"  id="Item_Instructions" ><%=product.Item_Instructions%></textarea></td>
        <td></td>
    </tr>
    <tr>
        <td><%=Lang.Show("productProperty1")%> :</td>
        <td><textarea rows="2"  id="Property1" ><%=product.Property1%></textarea></td>
        <td><p></p></td>
    </tr>
    <tr>
        <td><%=Lang.Show("productProperty2")%> :</td>
        <td><textarea rows="1"  id="Property2"  ><%=product.Property2%></textarea></td>
        <td></td>
    </tr>
    <tr>
        <td><%=Lang.Show("productProperty3")%> :</td>
        <td><textarea rows="1"  id="Property3"  ><%=product.Property3%></textarea></td>
        <td></td>
    </tr>
    <tr>
        <td><%=Lang.Show("productProperty4")%> :</td>
        <td><textarea rows="1"  id="Property4" ><%=product.Property4%></textarea></td>
        <td></td>
    </tr>
    <tr>
        <td><%=Lang.Show("productProperty5")%> :</td>
        <td><textarea rows="1"  id="Property5" ><%=product.Property5%></textarea></td>
        <td></td>
    </tr>
    <tr>
        <td><%=Lang.Show("Order")%> :</td>
        <td><input type="text" id="Orders" maxlength="3"  value="<%=product.Orders %>"  /></td>
        <td><div id="Validate-Orders"></div></td>
    </tr>
    <tr>
        <td></td>
        <td><button onclick="ProductAddEdit(<%=Item_Id %>)" class="button"><%=Lang.Show("Submit")%></button></td>
        <td></td>
    </tr>
</table>
</asp:Content>

